'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/api/login', controller.user.login);

  // post /user/login name,password  登录
  // post /user/register name,password 注册（创建）
  // post /user/sc id
  
  router.resources('users', '/user', controller.user)
  // 删除、添加、获取、修改
  // delete post get put


  // delete /user 必须的参数是：id 
  // post /user 必须的参数是：name,password


};
